<?php

/**
 * Description of MenuPlugin
 *
 * @author JeyDotC
 * @export Plugins
 */
class MenuPlugin extends UnderscorePlugin implements BeforeTask {

    const MENU_TREE = "__MENU";
    
    public function beforeTask($task) {
//        $tree = $this->loadMenuTree();
        $request = ModulesContext::instance()->getRequest();
        $user = ModulesContext::instance()->getCurrentUser();
        
        $request->setAttribute(self::MENU_TREE, $user->getPermissions());
        return true;
    }
}

?>
